import { request } from '@/utils/request.js'



/**
 * @description: 静默登录注册（code 获得 openid）
 * @param {*} code 
 * @return {*}
 */
// 获取opid
const appauth = params => {
    return request({
        url: '/auth/mpSignIn',
        method: 'POST',
        data: params
    })
}
// 这个接口完全可以省略了/user/profile
const userinfo = params => {
    return request({
        url: '/user/profile',
        method: 'get',
        data: params
    })
}
// /creditProduct/page
const creditProduct = params => {
    return request({
        url: '/creditProduct/page',
        method: 'POST',
        data: params
    })
}
// /userCar
const userCar = params => {
    return request({
        url: '/userCar',
        method: 'POST',
        data: params
    })
}
///activity/hotActivityList
const activity = params => {
    return request({
        url: '/activity/hotActivityList',
        method: 'get',
        data: params
    })
}
// /userCar/page
const userCarpage = params => {
    return request({
        url: '/userCar/page',
        method: 'post',
        data: params
    })
}
// receipt/save
const receipt = params => {
    return request({
        url: '/receipt/save',
        method: 'POST',
        data: params
    })
}
const productCategory = params => {
    return request({
        url: '/productCategory/list',
        method: 'GET',
        data: params
    })
}
// productCategory/list
// creditProduct
const creditProductdata = params => {
    return request({
        url: '/creditProduct/' + params,
        method: 'GET',
        data: params
    })
}
//creditOrder/exchange
const creditOrder = params => {
    return request({
        url: '/creditOrder/exchange',
        method: 'POST',
        data: params
    })
}
// /shopCategory/list
const shopCategorylist = params => {
    return request({
        url: '/shopCategory/list',
        method: 'get',
        data: params
    })
}
// /mallArea/list
const mallArealist = params => {
    return request({
        url: '/mallArea/list',
        method: 'get',
        data: params
    })
}
// /shop/info/{id}
const shopinfo = params => {
    return request({
        url: '/shop/info/' + params,
        method: 'get',
        data: params
    })
}
// /shop/page
const shoppage = params => {
    return request({
        url: '/shop/page',
        method: 'post',
        data: params
    })
}
// /merchant/page
const merchantpage = params => {
    return request({
        url: '/merchant/page',
        method: 'post',
        data: params
    })
}
// /merchant/info/{id}/
const merchantinfo = params => {
    return request({
        url: '/merchant/info/' + params,
        method: 'get',
        data: params
    })
}
// couponCategory/list
const couponCategory = params => {
    return request({
        url: '/couponCategory/list',
        method: 'post',
        data: params
    })
}
// /coupon/page
const couponpage = params => {
    return request({
        url: '/coupon/page',
        method: 'post',
        data: params
    })
}
// /coupon/createOrder/
const createOrder = params => {
    return request({
        url: '/coupon/createOrder/' + params,
        method: 'post',
        // data: params
    })
}
const couponpay = params => {
    return request({
        url: '/coupon/pay/' + params,
        method: 'post',
        // data: params
    })
}
// /activity/page
const activitypage = params => {
    return request({
        url: '/activity/page',
        method: 'post',
        data: params
    })
}
const activityinfo = params => {
    return request({
        url: '/activity/info/' + params,
        method: 'get',
        data: params
    })
}

// /activity/register
// /activity/info/
const activityregister = params => {
    return request({
        url: '/activity/register',
        method: 'post',
        data: params
    })
}
// /venue/page
const venuepage = params => {
    return request({
        url: '/venue/page',
        method: 'post',
        data: params
    })
}
// /venue/info/
const venueinfo = params => {
    return request({
        url: '/venue/info/' + params,
        method: 'get',
        data: params
    })
}
const userCarcarParkFee = params => {
    return request({
        url: '/userCar/carParkFee/' + params,
        method: 'get',
        data: params
    })
}

// /userCar/exchangeCoupon
const userexchangeCoupon = params => {
    return request({
        url: '/userCar/exchangeCoupon/' + params,
        method: 'post',
        data: params
    })
}
// /userCoupon/page
const userCouponpage= params => {
    return request({
        url: '/userCoupon/page',
        method: 'post',
        data: params
    })
}
// /userCoupon/info/
const userCouponinfo= params => {
    return request({
        url: '/userCoupon/info/' + params,
        method: 'get',
    })
}
// /receipt/page
const receiptpage = params => {
    return request({
        url: '/receipt/page',
        method: 'post',
		data: params
    })
}
///creditOrder/page
const creditOrderpage = params => {
    return request({
        url: '/creditOrder/page',
        method: 'post',
		data: params
    })
}
// /creditFlow/page
const creditFlowpage = params => {
    return request({
        url: '/creditFlow/page',
        method: 'post',
		data: params
    })
}
const ucreditOrderponinfo= params => {
    return request({
        url: '/creditOrder/info/' + params,
        method: 'get',
    })
}
// /activity/activityRegistration
const activityRegistration= params => {
    return request({
        url: '/activity/activityRegistration',
        method: 'post',
        data: params
    })
}
// /writeOff/count
const writeOffcount = params => {
    return request({
        url: '/writeOff/count',
        method: 'get',
        data: params
    })
}
// /banner/list
const BannerList = params => {
    return request({
        url: '/banner/list',
        method: 'get',
        data: params
    })
}
// /merchantReport
const merchantReport = params => {
    return request({
        url: '/merchantReport',
        method: 'post',
		data: params
    })
}

// /feedback
const FeedBack = params => {
    return request({
        url: '/feedback',
        method: 'post',
		data: params
    })
}
// writeOff/
const writeOff = params => {
    return request({
        url: '/writeOff/' + params,
        method: 'post',
    })
}
// /userCar
const adduserCar = params => {
    return request({
        url: '/userCar',
        method: 'post',
		data: params
    })
}
const DelluserCar = params => {
    return request({
        url: '/userCar/' + params,
        method: 'DELETE',
    })
}
// /writeOff/page
const writeOffpage = params => {
    return request({
        url: '/writeOff/page',
        method: 'post',
		data: params
    })
}
// /user/profile
const userprofile = params => {
    return request({
        url: '/user/profile',
        method: 'post',
		data: params
    })
}
// /auth/wx/getPhone
const getPhone = params => {
    return request({
        url: '/auth/wx/getPhone',
        method: 'get',
		data: params
    })
}
// carParkOrder/page
const carParkOrder = params => {
    return request({
        url: '/carParkOrder/page',
        method: 'post',
		data: params
    })
}
// /carParkOrder/info/
const carParkOrderinfo = params => {
    return request({
        url: '/carParkOrder/info/' + params,
        method: 'get',
		data: params
    })
}
// activityReview/page
const activityReviewpage = params => {
    return request({
        url: '/activityReview/page',
        method: 'post',
		data: params
    })
}
// /activity/create/
const activitycreate = params => {
    return request({
        url: '/activity/create/' + params,
        method: 'post',
		// data: params
    })
}
// /activity/pay
const activitypay = params => {
    return request({
        url: '/activity/pay',
        method: 'post',
		data: params
    })
}
// /creditOrder/refund
const creditOrderefundr = params => {
    return request({
        url: '//creditOrder/refund/apply',
        method: 'post',
		data: params
    })
}
// userCoupon/refund/apply
const userCouponapply = params => {
    return request({
        url: '/userCoupon/refund/apply',
        method: 'post',
		data: params
    })
}

// /activity/refund
const activityrefund = params => {
    return request({
        url: '/activity/refund/' + params,
        method: 'post',
		// data: params
    })
}
module.exports = {
     appauth,
	 userinfo,
	 creditProduct,
	 userCar,
	 activity,
	 userCarpage,
	 receipt,
	 productCategory,
	 creditProductdata,
	 creditOrder,
	 shopCategorylist,
	 mallArealist,
	 shopinfo,
	 shoppage,
	 merchantpage,
	 merchantinfo,
	 couponCategory,
	 couponpage,
	 createOrder,
	 couponpay,
	 activitypage,
	 activityinfo,
	 activityregister,
	 venuepage,
	 venueinfo,
	 userCarcarParkFee,
	 userexchangeCoupon,
	 userCouponpage,
	 userCouponinfo,
	 receiptpage,
	 creditOrderpage,
	 creditFlowpage,
	 ucreditOrderponinfo,
	 activityRegistration,
	 writeOffcount,
	 merchantReport,
	 FeedBack,
	 writeOff,
	 BannerList,
	 adduserCar,
	 DelluserCar,
	 writeOffpage,
	 userprofile,
	 getPhone,
	 carParkOrder,
	 carParkOrderinfo,
	 activityReviewpage,
	 activitycreate,
	 activitypay,
	 creditOrderefundr,
	 userCouponapply,
	 activityrefund
}


